﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/html5.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/respond.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="__PUBLIC__/Admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/Admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>图片列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 图片管理 <span class="c-gray en">&gt;</span> 图片列表 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">
	<div class="text-c"> 日期范围：
		<input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'logmax\')||\'%y-%M-%d\'}'})" id="logmin" class="input-text Wdate" style="width:120px;">
		-
		<input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'logmin\')}',maxDate:'%y-%M-%d'})" id="logmax" class="input-text Wdate" style="width:120px;">
		<input type="text" name="" id="" placeholder=" 图片名称" style="width:250px" class="input-text">
		<button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜图片</button>
	</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="select_plus()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> <a class="btn btn-primary radius" onclick="picture_add('添加图片','{:U('Admin/picture/picture_add_view','','')}')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加图片</a></span> <span class="r">共有数据：<strong>{$dataCount}</strong> 条</span> </div>
	<div class="imglist_wrap">
		 <foreach name="data" item="d">
		 <div class="imglist" daid = {$d['id']}>
			 <div class="img">
		     	 <img src="/{$d['content']}" width="100%" height="100%" alt="">
				 <div class="tags">{$d['groupname']}</div>
			 </div>
			 <div class="sort_"><b>{$d['sort']}</b></div>
			 <div class="img_test">
				  <p>{$d['title']} <span><a href="javascript:;" onclick="picture_edit('图片编辑','{:U('Admin/picture/picture_add_view')}?id={$d['id']}','{$d['id']}')"><i class="my-iconfont p_edit"></i>编辑</a><a href="javascript:;" onclick="picture_del(this,{$d['id']})"><i class="my-iconfont p_del"></i>删除</a></span></p>
			 </div>
		 </div>
		 </foreach>
	</div>
</div>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/MinAjax.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/template.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/select_plus.js"></script>
<script type="text/javascript">
/*图片-添加*/
function picture_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}

/*图片-编辑*/
function picture_edit(title,url,id){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*图片-删除*/
function picture_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		var imglist_wrap = document.getElementsByClassName('imglist_wrap')[0];
		var par = obj.parentNode.parentNode.parentNode.parentNode;
		var pic_delURL = "{:U('Admin/picture/delImage','','')}";
		pic_delURL+='?id='+id;
		ajax({
			type:"GET",
			url:pic_delURL,
			dataType:'text',
			success:function(data){
				if(data==1){
                    imglist_wrap.removeChild(par);
					layer.msg('已删除!',{icon:1,time:1000});
				}
			}
		})
//
	});
}
</script>
</body>
</html>